package com.example.mansystem.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Positive;
import java.util.Date;

@Data
public class ChatMsg {
    @Length(min = 3,max=18)
    @Pattern(regexp = "^[a-z0-9A-Z_-]{3,16}$",message = "用户名格式不正确")
    private String sendUserName;
    @Length(min = 3,max=18)
    @Pattern(regexp = "^[a-z0-9A-Z_-]{3,16}$",message = "用户名格式不正确")
    private String recUserName;
    @Positive(message = "日期不正确")
    private int date;
    private String type;
    private String content;
}
